<?php
/**
 * Created by PhpStorm.
 * User: mayn
 * Date: 2020/9/2
 * Time: 15:17
 */

require_once '../class/Sign.php';
$user_id = 1;
$time   = time();
$year   = date('Y', $time);
$month  = date('m', $time);
$day    = date('d', $time);
$sign = new Sign($user_id, $year, $month, $day);
$todaySign = $sign->getSignLog($user_id, $day);
echo $todaySign;die;
if ($todaySign) {
    echo '已经签到';die;
}
$res = $sign->setSignLog($day);
if ($res) {
    echo '签到成功';die;
}